#include "StdAfx.h"
#include "TeamWorkDiaryModel.h"


CTeamWorkDiaryModel::CTeamWorkDiaryModel(void)
{
	m_id = 0;
	m_teamID = 0;
	m_userID = 0;
}

CTeamWorkDiaryModel::~CTeamWorkDiaryModel(void)
{
}

void CTeamWorkDiaryModel::parseFromJson(Json::Value& jsonData)
{
	if (!jsonData["id"].isNull())
	{
		m_id = jsonData["id"].asInt();
	}
	if (!jsonData["teamID"].isNull())
	{
		m_teamID = jsonData["teamID"].asInt();
	}
	if (!jsonData["userID"].isNull())
	{
		m_userID = jsonData["userID"].asInt();
	}
	CUtils::getJsonStringField(jsonData, "workDay", m_workDay);
	CUtils::getJsonStringField(jsonData, "content1", m_content1);
	CUtils::getJsonStringField(jsonData, "content2", m_content2);
	CUtils::getJsonStringField(jsonData, "content3", m_content3);
}

